Refactor: use Arc<[PathBuf]> for AllowedPathResolver#2
Refactor: use Arc<[PathBuf]> for AllowedPathResolver#2Sewer56 merged 2 commits intoimpl-initial-toolsfrom
Conversation
Initial implementation of LLM coding tools
Move path-to-Vec<PathBuf> conversion into AllowedPathResolver::new(), eliminating duplicated boilerplate in all 5 allowed tool constructors. Using Arc<[PathBuf]> instead of Vec enables cheap Clone and signals immutability.
WalkthroughThe change refactors AllowedPathResolver to store allowed_paths as 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
🧹 Recent nitpick comments
📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (1)src/**/*.rs📄 CodeRabbit inference engine (src/AGENTS.md)
Files:
🧠 Learnings (3)📚 Learning: 2026-01-15T09:19:17.808ZApplied to files:
📚 Learning: 2026-01-15T09:19:17.808ZApplied to files:
📚 Learning: 2026-01-15T09:19:17.808ZApplied to files:
🧬 Code graph analysis (6)src/llm-coding-tools-rig/src/allowed/write.rs (1)
src/llm-coding-tools-rig/src/allowed/edit.rs (1)
src/llm-coding-tools-rig/src/allowed/read.rs (1)
src/llm-coding-tools-core/src/path/allowed.rs (5)
src/llm-coding-tools-rig/src/allowed/glob.rs (1)
src/llm-coding-tools-rig/src/allowed/grep.rs (1)
🔇 Additional comments (15)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full-review |
|
✅ Actions performedFull review triggered. |
Refactor: use Arc<[PathBuf]> for AllowedPathResolver
Summary
AllowedPathResolver::allowed_pathsfromVec<PathBuf>toArc<[PathBuf]>new()to accept genericimpl IntoIterator<Item = impl AsRef<Path>>, moving the conversion logic into the resolverBenefits
Arcenables O(1) cloning instead of deep-copying all paths